Skip to content

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • The BytecodeTranslator emitted "no class definition" errors for reflection-related types and java.io.Externalizable during translation, causing downstream iOS build steps to fail.
  • Providing minimal Java API stubs allows the translator to resolve these referenced types during writeOutput so classes are not purged or translation does not fail.
  • A missing xcodebuild in CI PATH is an environment/configuration issue that must be investigated separately and is not addressed by these stubs.

Description

  • Added stub interfaces under vm/JavaAPI/src/java/lang/reflect: GenericArrayType, ParameterizedType, TypeVariable, and WildcardType.
  • Added IO-related stubs under vm/JavaAPI/src/java/io: Externalizable, ObjectInput, and ObjectOutput.
  • Removed author tags from the new stub files to match repository style.

Testing

  • No automated tests were executed for this change.

Codex Task

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

✅ Continuous Quality Report

Test & Coverage

Static Analysis

Generated automatically by the PR CI workflow.

@github-actions
Copy link

github-actions bot commented Jan 30, 2026

✅ ByteCodeTranslator Quality Report

Test & Coverage

  • Tests: 135 total, 0 failed, 2 skipped

Benchmark Results

  • Execution Time: 10505 ms

  • Hotspots (Top 20 sampled methods):

    • 20.85% java.lang.String.indexOf (360 samples)
    • 19.46% com.codename1.tools.translator.Parser.isMethodUsed (336 samples)
    • 12.28% java.util.ArrayList.indexOf (212 samples)
    • 6.77% java.lang.Object.hashCode (117 samples)
    • 6.14% com.codename1.tools.translator.BytecodeMethod.addToConstantPool (106 samples)
    • 4.17% com.codename1.tools.translator.ByteCodeClass.calcUsedByNative (72 samples)
    • 2.66% java.lang.System.identityHashCode (46 samples)
    • 2.20% com.codename1.tools.translator.BytecodeMethod.appendMethodC (38 samples)
    • 1.45% com.codename1.tools.translator.Parser.cullMethods (25 samples)
    • 1.45% com.codename1.tools.translator.Parser.addToConstantPool (25 samples)
    • 1.45% com.codename1.tools.translator.Parser.generateClassAndMethodIndexHeader (25 samples)
    • 1.16% java.io.FileOutputStream.writeBytes (20 samples)
    • 1.16% com.codename1.tools.translator.ByteCodeClass.markDependent (20 samples)
    • 0.87% com.codename1.tools.translator.Parser.getClassObject (15 samples)
    • 0.81% java.util.TreeMap.getEntry (14 samples)
    • 0.81% com.codename1.tools.translator.BytecodeMethod.optimize (14 samples)
    • 0.75% java.io.FileOutputStream.open0 (13 samples)
    • 0.75% java.lang.StringBuilder.append (13 samples)
    • 0.75% com.codename1.tools.translator.BytecodeMethod.isMethodUsedByNative (13 samples)
    • 0.69% java.lang.StringCoding$StringEncoder.encode (12 samples)
  • ⚠️ Coverage report not generated.

Static Analysis

  • ✅ SpotBugs: no findings (report was not generated by the build).
  • ⚠️ PMD report not generated.
  • ⚠️ Checkstyle report not generated.

Generated automatically by the PR CI workflow.

@shai-almog
Copy link
Collaborator Author

shai-almog commented Jan 31, 2026

Compared 30 screenshots: 30 matched.

Native Android coverage

  • 📊 Line coverage: 24.96% (2675/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.54% (12402/50528), branch 15.45% (722/4672), complexity 17.61% (747/4241), method 33.13% (603/1820), class 34.98% (106/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.PushNotificationService – 0.00% (0/59 lines covered)

✅ Native Android screenshot tests passed.

Native Android coverage

  • 📊 Line coverage: 24.96% (2675/10717 lines covered) [HTML preview] (artifact android-coverage-report, jacocoAndroidReport/html/index.html)
    • Other counters: instruction 24.54% (12402/50528), branch 15.45% (722/4672), complexity 17.61% (747/4241), method 33.13% (603/1820), class 34.98% (106/303)
    • Lowest covered classes
      • com.codename1.impl.android.com.codename1.impl.android.AndroidContactsManager – 0.00% (0/400 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$Video – 0.00% (0/168 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.IntentIntegrator – 0.00% (0/139 lines covered)
      • com.codename1.impl.android.util.com.codename1.impl.android.util.Base64 – 0.00% (0/117 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidImplementation$SocketImpl – 0.00% (0/77 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidTextureView – 0.00% (0/76 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.AndroidSurfaceView – 0.00% (0/73 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.LocalNotificationPublisher – 0.00% (0/65 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.FridaDetectionUtil – 0.00% (0/64 lines covered)
      • com.codename1.impl.android.com.codename1.impl.android.PushNotificationService – 0.00% (0/59 lines covered)

@shai-almog
Copy link
Collaborator Author

shai-almog commented Feb 2, 2026

iOS screenshot updates

Compared 30 screenshots: 23 matched, 6 updated, 1 missing reference.

  • BrowserComponent — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    BrowserComponent
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as BrowserComponent.png in workflow artifacts.

  • graphics-draw-arc — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-arc
    Preview info: JPEG preview quality 20; JPEG preview quality 20; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-arc.png in workflow artifacts.

  • graphics-draw-gradient — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-gradient
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-gradient.png in workflow artifacts.

  • graphics-draw-round-rect — missing reference. Reference screenshot missing at /Users/runner/work/CodenameOne/CodenameOne/scripts/ios/screenshots/graphics-draw-round-rect.png.

    graphics-draw-round-rect
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 844x1835.
    Full-resolution PNG saved as graphics-draw-round-rect.png in workflow artifacts.

  • graphics-draw-string — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 422x918.
    Full-resolution PNG saved as graphics-draw-string.png in workflow artifacts.

  • graphics-draw-string-decorated — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    graphics-draw-string-decorated
    Preview info: JPEG preview quality 10; JPEG preview quality 10; downscaled to 603x1311.
    Full-resolution PNG saved as graphics-draw-string-decorated.png in workflow artifacts.

  • kotlin — updated screenshot. Screenshot differs (1206x2622 px, bit depth 8).

    kotlin
    Preview info: Preview provided by instrumentation.
    Full-resolution PNG saved as kotlin.png in workflow artifacts.

Benchmark Results

  • VM Translation Time: 353 seconds
  • Compilation Time: 403 seconds

Detailed Performance Metrics

Metric Duration
Build Time Statistics
Setup & Unzip 39507 ms
Extract Extensions 18 ms
Google Services Setup 1 ms
Scan Classes 688 ms
Extract Libs 1479 ms
Inject Build Hints 78 ms
Generate Unit Tests 12 ms
Generate Stubs 1161 ms
Compile Stubs 2698 ms
Generate Icons 1251 ms
Prepare ParparVM 171 ms
ParparVM Execution 198454 ms
Post-VM Setup 287 ms
CocoaPods 7459 ms
Finalize 39 ms
Total Time 253303 msMaven Overhead : 100000 ms
CocoaPods Install (Script) 2000 ms
Simulator Boot 339000 ms
Simulator Boot (Run) 7000 ms
App Install 21000 ms
App Launch 13000 ms
Test Execution 222000 ms

@shai-almog shai-almog merged commit c114314 into master Feb 2, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants